package com.hailian.fintech.hlfinanceserver.web;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hailian.fintech.hlcomm_interfaceserver.result.ResultInfo;
import com.hailian.fintech.hlfinanceserver.entity.Moneyplan;
import com.hailian.fintech.hlfinanceserver.service.IMoneyplanService;
import com.hailian.fintech.hlfinanceserver.vo.MoneyplanVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wk
 * @since 2020-05-23
 */
@RestController
@RequestMapping("/moneyplan")
public class MoneyplanController {

    @Autowired
    private IMoneyplanService iMoneyplanService;

    @RequestMapping("/findAll")
    public ResultInfo findAll(@RequestParam(defaultValue = "1") long current,
                              @RequestParam(defaultValue = "3") long size,
                              MoneyplanVo moneyplanVo){
        Page<MoneyplanVo> page = new Page<>(current, size);
        return new ResultInfo().success(iMoneyplanService.selectPageVo(page, moneyplanVo));
    }

}

